package com.example.app.listener;

import com.example.app.event.MyEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author wangzhuangzhuang
 * @DESC:
 * @date 2022-02-10 09:42
 */
@Component
@Slf4j
public class MyListener01 implements ApplicationListener<MyEvent> {

	@Override
	public void onApplicationEvent(MyEvent myEvent) {
		log.info(String.format("%s 监听到时间源： %s.", MyListener01.class.getName(), myEvent.getSource()));
	}

}